package com.comleader.operator.pojo.dto;

import java.util.ArrayList;
import java.util.List;

import com.comleader.operator.pojo.entity.PersonalUserEntity;

import cn.hutool.core.collection.CollectionUtil;
import lombok.Data;

/**
 * @Dscription 个人用户统计DTO对象，合规数据指的是对每一种不合规项都没有匹配上的，不合规数据指的是名称包含不合规的，
 *             比如个人移动用户-证件类型校验不合规、个人移动用户-机主姓名校验不合规这两个只要有一个匹配上就为不合规数据
 * @Author 连新景
 * @Date 2024/08/09 14:31
 */
@Data
public class PersonalUserStatDTO {

    // 未登记数据
    private List<PersonalUserEntity> unregisterList = new ArrayList<>();
    // 不合规数据
    private List<PersonalUserEntity> noncompliantList = new ArrayList<>();
    // 合规数据
    private List<PersonalUserEntity> compliantList = new ArrayList<>();
    // 个人移动用户-合规数据
    private List<PersonalUserEntity> personalMobileList = new ArrayList<>();
    // 单位移动用户-合规数据
    private List<PersonalUserEntity> companyMobileList = new ArrayList<>();
    // 个人固话用户-合规数据
    private List<PersonalUserEntity> personalTelephoneList = new ArrayList<>();
    // 单位固话用户-合规数据
    private List<PersonalUserEntity> companyTelephoneList = new ArrayList<>();
    // 行业移动应用-合规数据
    private List<PersonalUserEntity> industryMobileList = new ArrayList<>();
    // 行业固话应用-合规数据
    private List<PersonalUserEntity> industryTelephoneList = new ArrayList<>();

    public List<PersonalUserEntity> getCompliantList() {
        if (CollectionUtil.isEmpty(compliantList)) {
            compliantList.addAll(personalMobileList);
            compliantList.addAll(companyMobileList);
            compliantList.addAll(personalTelephoneList);
            compliantList.addAll(companyTelephoneList);
            compliantList.addAll(industryMobileList);
            compliantList.addAll(industryTelephoneList);
        }
        return compliantList;
    }
}
